import request from "@/utils/request";

// 查询合同列表
export function listContract(query) {
  return request({
    url: "/contract/Contract/list",
    method: "get",
    params: query,
    handleError: true,
  });
}

// 查询合同详细
export function getContract(contractId) {
  return request({
    url: "/contract/Contract/" + contractId,
    method: "get",
    handleError: true,
  });
}

// 新增合同
export function addContract(data) {
  return request({
    url: "/contract/Contract",
    method: "post",
    data: data,
  });
}

// 修改合同
export function updateContract(data) {
  return request({
    url: "/contract/Contract",
    method: "put",
    data: data,
  });
}

// 删除合同
export function delContract(contractId) {
  return request({
    url: "/contract/Contract/" + contractId,
    method: "delete",
  });
}
